package com.crm.business.admin.mapper;


import com.crm.common.admin.entity.BO.DeptVO;
import com.crm.common.admin.entity.PO.AdminDept;
import com.crm.business.servlet.BaseMapper;

import java.util.List;

/**
 * <p>
 * 部门表 Mapper 接口
 * </p>
 *
 * @author zhangzhiwei
 * @since 2020-04-27
 */
public interface AdminDeptMapper extends BaseMapper<AdminDept> {

    List<DeptVO> queryDeptUserList();
    List<AdminDept> listNew();
    List<Integer> queryDeptByPid(Integer deptId);
    Integer queryPidByDept(Integer deptId);

    List<Integer> queryIdsByPid(Integer deptId);

    /**
     * 根据部门id获取父级id
     */
    Long queryPidByDeptId(Long pid);

    /**
     * 根据组织Id查询所有上级名称
     * @param deptId
     * @return
     */
    String queryAllDeptNameByDeptId(Integer deptId);

}
